package com.jason.www.dao.impl;

import com.jason.www.code.BaseDaoImp;
import com.jason.www.dao.SysUserMapper;
import com.jason.www.pojo.SysUser;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class SysUserDaoImpl extends BaseDaoImp<SysUser> implements SysUserMapper {

    @Autowired
    @Qualifier("adminSqlSessionFactory")
    public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
        super.sqlSessionFactory = sqlSessionFactory;
    }

    @Override
    public int deleteByPrimaryKey(Long suid) {
        return 0;
    }

    @Override
    public int insert(SysUser record) {
        return 0;
    }

    @Override
    public int insertSelective(SysUser record) {
        return 0;
    }

    @Override
    public SysUser selectByPrimaryKey(Long suid) {
        List<SysUser> list = findByParameter("selectByPrimaryKey",suid);
        return list.stream().findFirst().get();
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return 0;
    }
}
